package org.example.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

import javax.sql.DataSource;

@Component
@ConditionalOnProperty(prefix = "spring.datasource", name = "update-type",havingValue="config",matchIfMissing=false)
public class UpdateDBSourceByCC {

    private static final Logger LOGGER  = LoggerFactory.getLogger(UpdateDBSourceByCC.class);

    @Autowired()
    DataSource dataSource;

    UpdateDBSourceByCC(){

        LOGGER.info("UpdateDBSourceByCC init");
    }

}
